﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.ComponentModel.DataAnnotations;

namespace XAPI.Domain
{
    /// <summary>
    /// The Verb defines the action between Actor and Activity.
    /// 
    ///Rationale -
    ///The Verb in an xAPI Statement describes the action performed during the learning experience. The 
    ///xAPI does not specify any particular Verbs. (With one exception, namely the reserved Verb 
    ///'http:///adlnet.gov/expapi/verbs/voided'). Instead, it defines how to create Verbs so that communities of 
    ///practice can establish Verbs meaningful to their members and make them available for use by 
    ///anyone. A predefined list of Verbs would be limited by definition and might not be able to effectively 
    ///capture all possible future learning experiences.
    ///
    ///Requirements - Verbs appear in Statements as Objects consisting of a URI and a set of display names corresponding 
    ///to the multiple languages or dialects which provide human–readable meanings of the Verb.
    ///• The display property MUST be used to illustrate the meaning which is already determined by the Verb URI.
    ///• A system reading a Statement MUST use the Verb URI to infer meaning.
    ///• The display property MUST NOT be used to alter the meaning of a Verb.
    ///• A system reading a Statement MUST NOT use the display property to infer any meaning from the Statement.
    ///• A system reading a Statement MUST NOT use the display property for any purpose other than 
    ///     display to a human. Using the display property for aggregation or categorization of Statements is 
    ///     an example of violating this requirement.
    ///• The display property SHOULD be used by all Statements.
    ///• The URI contained in the id SHOULD be human-readable and imply the Verb meaning.
    /// </summary>
    public class Verb : IEntity
    {
        /// <summary>
        /// Corresponds to a Verb definition. Each Verb definition corresponds 
        /// to the meaning of a Verb, not the word. The URI should be humanreadable and imply the Verb meaning.
        /// </summary>
        [DataMember(Name = "id")]
        [Key]
        public string Id { get; set; }

        /// <summary>
        /// The human readable representation of the Verb in one or more 
        /// languages. This does not have any impact on the meaning of the 
        /// Statement, but serves to give a human-readable display of the 
        /// meaning already determined by the chosen Verb.
        /// </summary>
        [DataMember(Name = "display")]
        public LanguageMap Display { get; set; }

        public string Key
        {
            get
            {
                return Id;
            }
        }

        string IEntity.Key
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }
    }
}
